//
//  SLAddShippingTableViewCell.m
//  StarLight
//
//  Created by apple on 16/8/28.
//  Copyright © 2016年 Duke.Wu. All rights reserved.
//

#import "SLAddShippingTableViewCell.h"


@interface SLAddShippingTableViewCell ()

@property (nonatomic ,strong) UILabel *titleLB;

@property (nonatomic ,strong) UIImageView *iconImg;

@end

@implementation SLAddShippingTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self addUI];
    }
    return self;
}

- (void)addUI{
    [self addSubview:self.titleLB];
    [self addSubview:self.iconImg];
    
    
    [self.titleLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.centerY.equalTo(self);
        
    }];
    
    [self.iconImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self).with.offset(-20);
        make.centerY.equalTo(self);
    }];
}

- (UILabel *)titleLB{
    if (!_titleLB) {
        _titleLB = [UILabel new];
        _titleLB.text = @"海牛4281";
        _titleLB.font = sFont(12);
        _titleLB.textColor = RGBCOLOR(0, 0, 0);
    }
    return _titleLB;
}

- (UIImageView *)iconImg{
    if (!_iconImg) {
        _iconImg = [UIImageView new];
        _iconImg.image = IMG(@"ic_arrow_right");
    }
    return _iconImg;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
